package com.mapper;

import com.pojo.DaYi_x;
import com.pojo.ZhuTi_x;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ZhuTiMapper_x {
    @Select("select * from zhuti_x where d_id=#{id}")
    List<ZhuTi_x> getById(Integer id);
    @Select("select count(d_id) from zhuti_x where d_id = #{id}")
    Integer getNum(Integer id);
    @Select("select max(time) from zhuti_x where d_id = #{id}")
    Integer getMax(Integer id);

    @Insert("insert into zhuti_x (user,content,tuser,del,d_id,status,time) values (#{user},#{content},#{tuser},#{del},#{dId},#{status},#{time})")
    Integer add(ZhuTi_x zhuTiX);
    @Delete("delete from zhuti_x where id=#{id}")
    Integer delete(Integer id);
    public List<ZhuTi_x> select(@Param("id") Integer id, @Param("user") String user, @Param("content") String content);
}
